﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Eagle.Web.TagFactory
{
    public class Select
    {
        /// <summary>
        /// 生成 select 的标签
        /// </summary>
        /// <param name="name">标签名称</param>
        /// <param name="createId">是否生成标签的Id</param>
        /// <param name="properties">标签的其他属性</param>
        /// <param name="options">select的Option</param>
        /// <returns></returns>
        public static string Create(string name, bool createId, string properties, string options)
        {
            string htmlTag = string.Empty;
            if (createId)
            { htmlTag = "<select  name=\"" + name + "\" id=\"" + name + "\" " + properties + " >" + options + "</select>"; }
            else
            { htmlTag = "<select  name=\"" + name + "\" " + properties + " >" + options + "</select>"; }
            return htmlTag;
        }
    }
}
